package org.glickr.api.test

import org.glickr.api.FlickrApiMethod
import groovy.util.slurpersupport.GPathResult

/* ----------------------------------------------------------------------------------------------------
REQUEST: flickr.test.echo
INFO: A testing method which echo's all parameters back in the response.

AUTHENTICATION: This method does not require authentication.

ARGUMENTS:
api_key (Required): Your API application key.

EXAMPLE RESPONSE:
<method>echo</method>
<foo>bar</foo>
---------------------------------------------------------------------------------------------------- */

class testEcho implements FlickrApiMethod {
    //
    //  API METHOD
    //
    String apiMethod = 'flickr.test.echo'

    //
    //  VALIDATOR
    //

    //
    //  PARAMS
    //
    Closure paramsClosure = { Map object ->
       [first:object.first, second:object.second, third:object.third]
    }

    //
    //  PROCESSOR
    //
    Closure processorClosure = { GPathResult response, Object dummy ->
        return [first: response.first, second: response.second, third: response.third]
    }

    //
    //  ERROR CODES
    //
}